<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="node_modules/vue/dist/vue.js"></script>
</head>
<body>
<!--v-show:根据表达式的真假切换元素的显示状态
操作的是display元素
写在后面的内容都会转换成 true false
   -->
<div id="app">
    <img v-show="age>=18" src="./img/monkey.gif" alt="">
    <button @click="watch">look</button>
</div>
<script>
  var app=  new Vue({
        el:"#app",
      data:{
            age:15,
           isshow:false
      },
      methods:{
            watch:function () {
                this.isshow=true;
                this.age=18;
            }
      }
    })
</script>
</body>
</html>